package gameressources;

import java.util.ArrayList;
import java.util.List;

public class Player {

	private String Name;
	private int Score;
	private List<RPSEnum> Moves;

	public Player(String name, int score, List<RPSEnum> moves) {
		this.Name = name;
		this.Score = score;
		this.Moves = moves;
	}

	public Player(String name) {
		this.Name = name;
		this.Score = 0;	
		this.Moves = new ArrayList<RPSEnum>();
		for (int i = 0; i < 10; i++) {
			int random = (int) (Math.random() * (2));
			switch (random) {
			case 0:
				this.Moves.add(RPSEnum.ROCK);
				break;
			case 1:
				this.Moves.add(RPSEnum.PAPER);
				break;
			case 2:
				this.Moves.add(RPSEnum.SCISSORS);
				break;
			default:
				break;

			}

		}

	}

	public String getName() {
		return this.Name;
	}

	public int getScore() {
		return this.Score;
	}

	public int getRPSEnumLength() {
		return this.Moves.size();
	}

	public RPSEnum getNextMove() {
		return Moves.listIterator().next();
	}

	public void setScore(int score) {
		this.Score = score;
	}

}
